<div ng-controller="Report_DailysalesC">
    <div class="bg-light lter b-b wrapper-md">
        <h1 class="m-n font-thin h3">日采购销售情况</h1>
    </div>
    <div class="wrapper-md" style="text-align: right;">
        <div class="panel panel-default">
            <div class="panel-heading">
            </div>
            <div class="table-responsive">
                <table id="example1" class="table table-striped b-t b-light table-bordered">
                    <thead>
                    <tr>
                        <th style="text-align: center;" ng-repeat="item in neworders[0] track by $index">{{item}}</th>
                    </tr>
                    </thead>
                    <tbody>
                    <tr ng-repeat="ord in orders track by $index">
                        <td class="text-center" ng-repeat="item in ord track by $index">{{item}}</td>
                    </tr>
                    </tbody>
                </table>
            </div>
        </div>
    </div>
</div>

<script>
    angular.module('app')
            .controller("Report_DailysalesC", function ($scope, $state, $http) {
//                $scope.finddata = new Date();
                $scope.getData = function () {
                    $http({
                        url: "../api/Report/GetDepotInfo?isHander=true",
                        method: "GET"
                    })
                            .then(function (res) {
                                console.log(res.data);
                                $scope.orders = res.data;
                                $scope.neworders = $scope.orders.splice(0,1);
                            })
                            .then(function (error) {
                                if (error) {
                                    alert("数据获取失败");
                                }
                            });
                };
                //加载数据
                $scope.getData();
                $scope.guolv=function(item){
                    return typeof item === 'number'
                }
            })
</script>